home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / dhcp3-client.postinst < prev    next >
Encoding:
Text File  |  2007-04-02  |  1.5 KB  |  52 lines

  1. #!/bin/sh -e
  2. #
  3. # $Id: dhcp3-client.postinst,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
  4. #
  5.  
  6. # Source debconf library.
  7. . /usr/share/debconf/confmodule
  8.  
  9. case "$1" in
  10.     configure)
  11.         if [ ! -e /var/lib/dhcp3/dhclient.leases ]; then
  12.             if test -e /var/lib/dhcp/dhclient.leases; then
  13.                 cp /var/lib/dhcp/dhclient.leases /var/lib/dhcp3/dhclient.leases
  14.             else
  15.                 touch /var/lib/dhcp3/dhclient.leases
  16.             fi
  17.         fi
  18.         
  19.         # create system dhcp user and group
  20.         adduser --system --quiet --no-create-home --home /nonexistent --group dhcp
  21.  
  22.         # allow dhcp client to call setuid wrapper
  23.         chown root:dhcp /lib/dhcp3-client/call-dhclient-script
  24.         chmod 4754 /lib/dhcp3-client/call-dhclient-script
  25.  
  26.         if dpkg --compare-versions "$2" lt-nl "3.0.4-2"; then
  27.                 if [ -e /etc/dhcp3/dhclient-script ]; then
  28.                         db_input high dhcp3-client/dhclient-script_moved || true
  29.                         db_go
  30.                 else
  31.                         db_input high dhcp3-client/dhclient-needs-restarting
  32.                         db_go
  33.                 fi
  34.         fi
  35.  
  36.         if [ -e /etc/dhcp3/dhclient.conf.oldconfig ]; then
  37.                 mv /etc/dhcp3/dhclient.conf.oldconfig /etc/dhcp3/dhclient.conf
  38.         fi
  39.         ;;
  40.  
  41.     abort-upgrade|abort-remove|abort-deconfigure)
  42.         exit 0
  43.         ;;
  44.     
  45.     *)
  46.         echo "postinst called with unknown argument \`$1'" >&2
  47.         exit 0
  48.         ;;
  49. esac
  50.  
  51.  
  52.